package com.reservationserver.mapper.admin;

import com.reservationpojo.domin.vo.Addmgrvo;
import com.reservationpojo.domin.vo.Getmgrvo;
import com.reservationpojo.domin.vo.Mgrlogvo;
import com.reservationpojo.entity.Mgr;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface Mgrmapper {

    List<Mgr> getmgrmapper(Getmgrvo getmgrvo);
    @Select("Select mgr_id, password, mgr_name, initial from mgr where mgr_id=#{mgrId} and password=#{password}")
    Mgr mgrlogin(Mgrlogvo mgrlogin);
    @Insert("INSERT INTO mgr (mgr_id,password,mgr_name,initial) VALUES (#{mgrId},#{password},#{name},#{initial})")
    void addmgr(Addmgrvo mgrvo);

    void upmgr(Mgr mgr);
@Delete("delete from mgr where mgr_id =#{mgrId}")
    void deletemgr(String mgrId);
}
